IF   (OSGLEAP_BUILD_SHARED_LIBS)
    ADD_DEFINITIONS(-DOSGLEAP_LIBRARY)
ELSE (DYNAMIC_OPENSCENEGRAPH)
    ADD_DEFINITIONS(-DOSGLEAP_LIBRARY_STATIC)
ENDIF(OSGLEAP_BUILD_SHARED_LIBS)

FIND_PACKAGE(osg)
FIND_PACKAGE(osgDB)
FIND_PACKAGE(osgGA)
FIND_PACKAGE(osgUtil)
FIND_PACKAGE(osgViewer)
FIND_PACKAGE(OpenThreads)
FIND_PACKAGE(LeapSDK)

SET(LIB_NAME osgLeap)

SET(HEADER_PATH ${OSGLEAP_SOURCE_DIR}/include/${LIB_NAME})

INCLUDE_DIRECTORIES(${LEAP_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIR})

SET(TARGET_H
    ${HEADER_PATH}/Controller
    ${HEADER_PATH}/Export
	${HEADER_PATH}/HandState
	${HEADER_PATH}/HUDCamera
	${HEADER_PATH}/PointerPositionListener
	${HEADER_PATH}/PointerGraphicsUpdateCallback
	${HEADER_PATH}/Listener
	${HEADER_PATH}/OrbitManipulator
	${HEADER_PATH}/Pointer
	${HEADER_PATH}/PointerEventDevice
)

SET(TARGET_SRC
	Controller.cpp
	HandState.cpp
	HUDCamera.cpp
	PointerPositionListener.cpp
	PointerEventDevice.cpp
	PointerGraphicsUpdateCallback.cpp
    OrbitManipulator.cpp
)

SET(TARGET_LIBRARIES_VARS
    LEAP_LIBRARY
	OSG_LIBRARY
	OSGDB_LIBRARY
	OSGGA_LIBRARY
	OSGUTIL_LIBRARY
	OSGVIEWER_LIBRARY
	OPENTHREADS_LIBRARY
)

SETUP_LIBRARY(${LIB_NAME})
